package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(30)" json:"username"`
	Password string `gorm:"type:char(32)" json:"password"`
}
type Movie struct {
	gorm.Model
	Title     string `gorm:"type:varchar(30)" json:"title"`
	Content   string `gorm:"type:text" json:"content"`
	Img       string `gorm:"type:varchar(255)" json:"img"`
	Score     string `gorm:"type:decimal(10,2)" json:"score"`
	LikeCount int    `gorm:"type:int;default:0" json:"like_count"`
	ViewCount int    `gorm:"type:int;default:0" json:"view_count"`
	UserID    int    `json:"user_id"`
}
type UserLike struct {
	gorm.Model
	UserID  uint `gorm:"int" json:"user_id"`
	MovieID uint `gorm:"int" json:"movie_id"`
}
type UserView struct {
	gorm.Model
	UserID  uint `gorm:"int" json:"user_id"`
	MovieID uint `gorm:"int" json:"movie_id"`
}
